package com.kotiln.lgc.lib_network.thread;

/**
 * @author
 * @date 2021/3/3
 */
public class DefaultThreadPool extends ThreadPool {
    protected DefaultThreadPool(Builder builder) {
        super(builder);
    }

    public static class Builder extends ThreadPool.Builder {


        @Override
        public ThreadPool create() {
            corePoolSize = 3;//核心线程数
            maximumPoolSize = 10;//最大线程数
            keepAliveTime = 1;//线程存活时间
            capacity = 100;//队列大小

            return new DefaultThreadPool(this);
        }


    }
}
